package one.stand.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
public class Index2Response {
    @ApiModelProperty(value = "轮播图列表")
    private List<Banner> banner;
    @ApiModelProperty(value = "分类分组")
    private List<Type> types;

    @Data
    @Builder
    public static class Banner {
        @ApiModelProperty(value = "资源")
        private String source;
        @ApiModelProperty(value = "资源类型：0 图片")
        private Integer type;
        @ApiModelProperty(value = "事件：0 无 1 跳转商品详情")
        private String event;
        @ApiModelProperty(value = "事件参数")
        private Integer id;
    }

    @Data
    @Builder
    public static class Type {
        private Integer typeId;
        private String typeName;
        @ApiModelProperty(value = "二级分类列表")
        private List<Type> types;
        @ApiModelProperty(value = "商品列表（8个）")
        private List<Goods> goods;
    }

    @Data
    @Builder
    public static class Goods {
        @ApiModelProperty(value = "商品ID")
        private Integer id;
        @ApiModelProperty(value = "商品名称")
        private String name;
        @ApiModelProperty(value = "商品图片")
        private String path;
        @ApiModelProperty(value = "价格")
        private String price;

        private Long visitNum;
        private String categoryName;
        private String categoryName2;
        private boolean hasVr;
        private boolean hasVideo;
        private boolean hasAr;
    }
}
